import request from '@/utils/http'
// 保存报告
export const saveReport = (params: any) => {
  return request.post({
    url: '/api/patient/indicator/report/saveReport',
    data: params
  })
}

// 新指标保存
export const saveNewIndicator = (params: any) => {
  return request.post({
    url: '/api/signs/info/new_save',
    data: params
  })
}

// 尿酸、血酮、血脂、肝功能 明细
export const getNewDetail = (params: any) => {
  return request.get({
    url: `/api/patient/indicator/report/queryUserHisReportDetail?empi=${params.empi}&indicatorKey=${params.indicatorKey}`
  })
}

export const getWaterSleepDetail = (params: any) => {
  return request.post({
    url: `/api/signs/info/ext/detail`,
    data: params
  })
}

// 保存医疗信息
export const saveMedicalInfo = (params: any) => {
  return request.post({
    url: `/api/patient/info/history/save`,
    data: params
  })
}
// 获取运动记录
export function getSportRecord(data: any) {
  return request.get({
    url: `/api/sp/pat/daily/task/getSportRecord`,
    data
  })
}
// 获取指标信息
export function getSignsList(data: any) {
  return request.post({
    url: `/api/signs/info/signs/list`,
    data
  })
}
// 获取指标信息
export function signsInfoDelete(data: any) {
  return request.post({
    url: `/api/signs/info/delete`,
    data
  })
}
// 查看报名状态
export function signStatus(data: any) {
  return request.get({
    url: `/api/app/campaign/signStatus`,
    data
  })
}
// 上传图片
export function uploadCamp(data: any) {
  return request.upload({
    url: `/api/app/campaign/upload`,
    file: data,
    name: 'imgFile'
  })
}
// 保存图片
export function saveCampPic(data: any) {
  return request.post({
    url: `/api/app/campaign/saveCampPic`,
    data
  })
}
